{% extends 'admin/layout.html.twig' %}

{% set menu = menu|default('admin_block') %}

{% set script_controller = 'block/list' %}
{% block main %}
 {% include 'admin/block/table.html.twig'%}
<table id="block-table" class="table table-striped">
  <thead>
    <tr>
      <th width="50%">{{'admin.block_manage.title'|trans}}</th>
      <th width="25%">{{'admin.block_manage.latest_update'|trans}}</th>
      <th width="25%">{{'admin.block_manage.operation'|trans}}</th>
    </tr>
  </thead>
  <tbody>
    {% if blockTemplates %}
      {% for blockTemplate in blockTemplates %}
        {% set latestHistory = latestHistories[blockTemplate.id]|default(null) %}
        {% set latestUpdateUser = users[latestHistory.userId|default(null)]|default(null) %}
        {% include 'admin/block/list-tr.html.twig' %}
      {% endfor %}
  {% else %}
        <tr><td colspan="20"><div class="empty">{{'admin.block_manage.empty'|trans}}</div></td></tr>
  {% endif %}
   </tbody>
</table>
 {{ admin_macro.paginator(paginator) }} 
 <style>
.form-control.quicksearch{
  display:inline;
  float:right;
  width:auto;
  padding:4px 12px;
}

.price{

  color: #e57259;
  font-size: 16px;

}

.ui-autocomplete {
    border:1px solid #ccc;
    background-color: #FFFFFF;
    box-shadow: 2px 2px 3px #EEEEEE;
}
.ui-autocomplete-ctn{
    margin:0;
    padding:0;
}
.ui-autocomplete-item {
    width: 180px;
    overflow:hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 30px;
    padding:0 10px 0 10px;
    cursor: default;
}
.ui-autocomplete-item-hover {
    background:#f2f2f2;
}
.ui-autocomplete-item-hl {
    background:#F6FF94;
}
</style>
{% endblock %}
